﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Web.UI;
using System.Web;

namespace Ccit.Utils
{
    /// <summary>
    /// 文件操作类
    /// </summary>
    public class FileLib
    {
        private const string DIR_LOGO = "images/plate_logo";  //板块LOGO文件夹

        /// <summary>
        /// 获取板块LOGO文件夹下图片名称
        /// </summary>
        /// <param name="pattern">指定的搜索模式</param>
        /// <returns></returns>
        public static string[] GetLogoImageName(string pattern)
        {
            string relationPath = RequestContext.GetRelativelyPath();  //获取相对路径
            string appPath = HttpContext.Current.Server.MapPath(relationPath + DIR_LOGO);
            string[] pices = Directory.GetFiles(appPath, pattern);
            return pices;
        }
    }
}
